package cn.tedu.fruitshop.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 折扣表
 *
 * @author www
 * @create 2022-11-05 16:58
 */
@Data
public class CouponsAddNewDTO implements Serializable {

    /**
     * 优惠券名称
     */
    @NotNull(message = "优惠券名称不能为空")
    @ApiModelProperty(value = "优惠券名称",required = true)
    private String couponName;
    /**
     * 优惠券数量
     */
    @NotNull(message = "优惠券数量不能为空")
    @ApiModelProperty(value = "优惠券数量",required = true)
    private Integer couponNum;
    /**
     * 优惠券金额
     */
    @NotNull(message = "优惠券金额不能为空")
    @ApiModelProperty(value = "优惠券金额",required = true)
    private Double couponMoney;

    /**
     * 优惠券门槛
     */
    @NotNull(message = "优惠券门槛不能为空")
    @ApiModelProperty(value = "优惠券门槛",required = true)
    private Double limitMoney;

    /**
     * 每人限领数量
     */
    @NotNull(message = "每人限领数量不能为空")
    @ApiModelProperty(value = "每人限领数量",required = true)
    private Integer limitNum;

    /**
     * 开始时间
     */
    @NotNull(message = "开始时间不能为空")
    @ApiModelProperty(value = "开始时间",required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginTime;

    /**
     * 结束时间
     */
    @NotNull(message = "结束时间不能为空")
    @ApiModelProperty(value = "结束时间",required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

}
